--------------------------------------------------------------------------------
README for "Abortion Laws and Women’s Health"
Damian Clarke and Hanna Mühlrad
--------------------------------------------------------------------------------

This folder contains three sub-directories:
|_ data:    contains all data used in the replication materials
|_ source:  contains all source code used for replication of results
|_ results: tables and figures provided in the paper (THIS WILL BE POPULATED
            WHEN CODES ARE RUN)
|_ log:     a log file produced when running each piece of source code
These have been provided as zipped files (format .7z) and should be unzipped
prior to replication.

Results in the paper are provided at two levels.  The majority of the results
are based on regressions/descriptives using state by month by year aggregates,
and a smaller number of results are based on regressions/descriptives using st-
ate by year aggregates.  The results based on monthly aggregates are created
using the file:
 > "analysisMonth.do"
and the results based on yearly aggregates are created using the file:
 > "analysisYear.do"

The aforementioned files are used to generate all main and appendix results ex-
amining fertility, morbidity or mortality outcomes.  A number of additional re-
sults are generated.  The relevant scripts, along with their results are:
 > analysisJudicial.do: Analysis based on legal records of abortion prosecution
 > privateMorbidity.do: Descriptive plots of private hospitalisations
 > HonestDiD.R: Analysis using Rambachan and Roth's Honest DiD routines.

All results in the paper can be replicated by running the programs provided in
the "source" sub-directory.  These should be run in Stata in version 13.0 or
above, when Stata scripts, or R v 3.6.0 or above (tested in v 3.6.3) when R scr-
ipts. The only change required to run each file is to the ROOT global at the
top of each script. This should be changed to indicate the location of these
replication materials on your computer.  For example, if the replication mate-
rials are located in a folder called "/home/replication", the line in each scr-
ipt defining the ROOT global should be set as:

    global ROOT "/home/replication/"

Additionally, this file replicates the results contained in online appendices.
If you wish to generate the precise format of results from the paper, the tex
files located in this directory can be compiled, providing the complete rendered
output.

A number of external user-written ados or R libraries are required, which can be
installed from Stata's SSC or github/CRAN.  In the case of ados, these are insta-
lled automatically if not available, provided that internet connectivity is avai-
lable. If a required ado file is not installed and internet connectivity is not
available, the script will fail to run until either the ado has been installed
and the scripts are re-run, or internet connectivity is available and the script
is re-run.

Tables are all exported as tex files, and figures are all exported as eps files.
If you desire to replicate the precise format of these tables and figures as
presented in the paper, you can compile the tex file in the main directory using
the following command:

  xelatex AbortionWomensHealth.tex

For any queries contact Damian Clarke at

  dclarke [AT] fen.uchile.cl

or

  damian.clarke [AT] protonmail.com.

--------------------------------------------------------------------------------
